package com.numberone.master.modules.news.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.numberone.master.common.persistence.DataEntity;

/**
 * 消息推送Entity
 * @author chengkang
 * @version 2018-02-23
 */
public class News extends DataEntity<News> {
	
	private static final long serialVersionUID = 1L;
	private String acceptUserId;		// 接收用户ID
	private String pushNewsId;		// 推送消息ID
	private String seeState;		// 是否已读
	private Date seeDateTime;		// 阅读时间
	private String title;		// 标题
	private String count;		// 内容
	private String seeType;		// 消息类型
	private String acceptUserType;//接收人类型
	private String acceptUserName;
	
	public News() {
		super();
	}

	public News(String id){
		super(id);
	}

	@Length(min=0, max=10, message="接收用户ID长度必须介于 0 和 10 之间")
	public String getAcceptUserId() {
		return acceptUserId;
	}

	public void setAcceptUserId(String acceptUserId) {
		this.acceptUserId = acceptUserId;
	}
	
	@Length(min=0, max=10, message="推送消息ID长度必须介于 0 和 10 之间")
	public String getPushNewsId() {
		return pushNewsId;
	}

	public void setPushNewsId(String pushNewsId) {
		this.pushNewsId = pushNewsId;
	}
	
	@Length(min=0, max=1, message="是否已读长度必须介于 0 和 1 之间")
	public String getSeeState() {
		return seeState;
	}

	public void setSeeState(String seeState) {
		this.seeState = seeState;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getSeeDateTime() {
		return seeDateTime;
	}

	public void setSeeDateTime(Date seeDateTime) {
		this.seeDateTime = seeDateTime;
	}
	
	@Length(min=0, max=50, message="标题长度必须介于 0 和 50 之间")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	public String getCount() {
		return count;
	}

	public void setCount(String count) {
		this.count = count;
	}
	
	@Length(min=0, max=1, message="消息类型长度必须介于 0 和 1 之间")
	public String getSeeType() {
		return seeType;
	}

	public void setSeeType(String seeType) {
		this.seeType = seeType;
	}

	public String getAcceptUserType() {
		return acceptUserType;
	}

	public void setAcceptUserType(String acceptUserType) {
		this.acceptUserType = acceptUserType;
	}

	public String getAcceptUserName() {
		return acceptUserName;
	}

	public void setAcceptUserName(String acceptUserName) {
		this.acceptUserName = acceptUserName;
	}
	
}